import http from "@/utils/http/hub";

/**
 * 全部服务
 */
export const getAllServices = (
  params,
  config = {
    custom: {
      auth: false,
    },
  }
) => {
  return http.get({
    url: `/service/allServices`,
    params,
    config,
  });
};

/**
 * 服务详情
 */
export const getServiceDetail = (
  params,
  config = {
    custom: {
      auth: true,
    },
  }
) => {
  return http.post({
    url: `/service/detail`,
    params,
    config,
  });
};

/**
 * 获取服务sku
 * cityCode 所在城市编码
 * domesticServiceId 服务id
 */
export const getServiceSku = (
  params,
  config = {
    custom: {
      auth: true,
    },
  }
) => {
  return http.post({
    url: `/service/sku`,
    params,
    config,
  });
};
